package day0723;

import javax.swing.*;
import java.awt.*;
import java.util.Random;

public class Beeplane extends FlyingObject{

    Beeplane(){
        Random r=new Random();
        int n=r.nextInt(420);
        x = n;
        y = 0;
        ImageIcon bgIcon=new ImageIcon("images1/bee0.png");
        beeImage=bgIcon.getImage();
        height=bgIcon.getIconHeight();
        width=bgIcon.getIconWidth();
    }

    void fly(){
        y+=5;
    }

    boolean outofbounds() {
        return y>GamePane.height;
    }
}
